package cate.common.table.item.rune.row;

import cate.common.table.ERow;
import cate.common.table.XSSFRowWrap;
import cate.common.util.random.RWItem;
import easy.java.dev.note.NoteField;

public class RuneSkillRow extends ERow implements RWItem {

    @NoteField(value = "技能ID")
    public int skillId;

    @NoteField(value = "权重")
    public double weight;

    @NoteField(value = "所属技能组")
    public int groupId;

    @Override
    public void parse(XSSFRowWrap xr) {
        this.id = xr.getInteger("ID", -1);
        this.skillId = xr.getInteger("技能ID", -1);
        this.weight = xr.getDouble("权重", 1.0);
        this.groupId = xr.getInteger("所属技能组", -1);
    }

    @Override
    public double getWeight() {
        return weight;
    }
}
